package com.qipay.configuration.config;

/**
 * Creator: Yao
 * Date:    2017/9/30
 * For:
 * Other:
 */
public enum ConfigurationEnum {

    AUDIT_START_TIME((byte) 0),
    AUDIT_END_TIME((byte) 1),
    WITHDRAW_AVAILABLE_COST((byte) 2),
    WITHDRAW_ADVANCE_RATE((byte) 3),
    WITHDRAW_MIN((byte) 4),
    WITHDRAW_MAX_HOLIDAY((byte) 5),
    WITHDRAW_INFORM_STAFF((byte) 6),
    WITHDRAW_MAX_WORK((byte) 7);


    private byte type;

    ConfigurationEnum(byte type) {
        this.type = type;
    }

    public byte getType() {
        return type;
    }

    public void setType(byte type) {
        this.type = type;
    }

    public static ConfigurationEnum convert(Byte type) {

        ConfigurationEnum conf = null;

        if (null != type) {
            for (ConfigurationEnum p : ConfigurationEnum.values()) {
                if (type.equals(p.getType())) {
                    conf = p;
                    break;
                }
            }
        }

        return conf;
    }
}
